STEP 12: Next, we'll use our list of image labels to randomly generate sprites on the stage.

  • From , drag Random Choice onto the next line in the for loop. Make sure it is indented twice!
  • Change the variable name from my_var to rand_image. This will change each time the loop runs!
  • Change my_list to the list image_labels that we created earlier. This will select a random image label now!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)